package cn.wangsy.zhidao.p20170105;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class RandomWriter {

	public static void main(String[] args) {
		try {
			Random random = new Random();
			FileWriter writer = new FileWriter("data.txt");
			for(int i = 0;i < 1000;i++){
				writer.write(random.nextInt(1000)+"\n");
			}
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
